package com.itheima.string;

import java.util.Scanner;

public class Demo4 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String  s=scanner.nextLine();
        for (int i = 0; i <s.length() ; i++) {
            char c1=s.charAt(i);
            System.out.println(c1);

        }
        System.out.println(".......................");
        char[] c=s.toCharArray();//转成一个字符类型的数组
        for (int i = 0; i <c.length ; i++) {
            System.out.println(c[i]);
        }
    }
}
